#include <stdio.h>
int main ()
{
	int i;
	for (i=1;i<=100;i++)
	{
		if (i%8==0&&i%9==0)
		printf ("%d\n",i);
	}
}
